package cn.jinzhu.openfeign.service;

import cn.jinzhu.entity.User;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.UnsupportedEncodingException;
@Component //服务降级注入进去
@RequestMapping("/jinzhu")//因为一个接口不能实现二次，会报错，这个就是给他一个前缀，前缀可以自定义，避免请求地址重负，一定要加这个
public class HelloServiceFallback implements HelloService {
    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello1(String name) {
        return "error";
    }

    @Override
    public User hello3(User user) {
        return null;
    }

    @Override
    public String delete1(Integer id) {
        return null;
    }

    @Override
    public String GetUserByName(String name) throws UnsupportedEncodingException {
        return null;
    }
}
